<?php
namespace app\api\validate\service;

use think\Validate;

class ApplyShop extends Validate
{

    protected $rule =   [
        'name'               => 'require',
        'category_ids'       => 'require',
        'leader_mobile'      => 'require',
        'goods_ids'          => 'require',
        'username'           => 'require',
        'mobile'             => 'require',
        'idcard'             => 'require',
        'license_image'      => 'require',
        'intro'              => 'require',
        'health_image'       => 'require',
        'front_image'        => 'require',
        'opposite_image'     => 'require',
        'credit_code'        => 'require',
        'logo_image'         => 'require',
        'address'            => 'require',
        'lng'                => 'require',
    ];

    protected $message  =   [
        'name.require'             => '请填写姓名',
        'leader_mobile.require'    => '请填写负责人手机号',
        'category_ids.require'     => '请选择经营分类',
        'username.require'         => '法人姓名必须填写',
        'mobile.require'           => '法人手机号必须填写',
        'idcard.require'           => '身份证号必须填写',
        'license_image.require'    => '请上传营业执照',
        'intro.require'            => '请填写商家简介',
        'goods_ids.require'        => '服务项目必须选择',
        'front_image.require'      => '身份证必须上传',
        'opposite_image.require'   => '身份证必须上传',
        'credit_code.require'      => '请填写社会信用代码',
        'logo_image.require'       => '请上传商家logo',
        'address.require'          => '请填写地址信息',
        'lng.require'              => '定位信息异常'
    ];

    protected $scene = [
        'edit'  =>  ['name','category_ids','skill_cate_id','intro','username','idcard','license_image','front_image','opposite_image','credit_code','goods_ids','mobile','address','lng','leader_mobile'],
        'add'   =>  ['name','category_ids','skill_cate_id','intro','username','idcard','license_image','front_image','opposite_image','credit_code','goods_ids','mobile','address','lng','leader_mobile'],
    ];

}
